﻿using mars_server.csharp.socket;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mars_server.csharp.Util
{
    class SocketUtil
    {
        public static byte[] getBytesFromUs(UserSocket userSocket)
        {
            return userSocket.br.ReadBytes(userSocket.client.Available);
        }


        public static string getSocketInfo(UserSocket userSocket)
        {
            return "ip地址："+userSocket.client.Client.RemoteEndPoint.ToString();
        }
    }
}
